export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  dialogWidth: '70%',
  addBtn: false,
  showClomnuBtn: false,
  searchSize: 'mini',
  delBtn: false,
  editBtn: false,
  searchMenuSpan: 6,
  column: [{
    label: '标识',
    prop: 'id',
    hide: true,
    addDisplay: false,
    editDisplay: false
  }, {
    label: '出库单号',
    prop: 'outputStockno',
    search: true,
    addDisplay: false,
    editDisplay: true,
    editDisabled: true
  }, {
    label: '票种',
    prop: 'ticketType',
    type: 'select',
    dicUrl: '/support/swpmticketcardtype/dict',
    props: {
      label: 'mainName',
      value: 'mainEnName'
    },
    cascaderItem: ["ticketName"],
    search: true,
    rules: [{
      required: true,
      message: '请选择清销毁票种',
      trigger: 'blur'
    }]
  }, {
    label: '车票名称',
    prop: 'ticketName',
    type: 'select',
    props: {
      label: 'subName',
      value: 'subEnName'
    },
    dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
    dicFlag: false,
    rules: [{
      required: true,
      message: '请选择车票名称',
      trigger: 'blur'
    }],
    component: 'ticket-name-select',
    search: true,
    params: {
      ticketAmountKey: 'ticketPrice',
      ticketCountKey: 'ticketTimes'
    },
  }, {
    label: '车票次数',
    prop: 'ticketTimes',
    rules: [{
      message: '请输入车票次数',
      trigger: 'blur'
    }]
  }, {
    label: '金额',
    prop: 'ticketPrice',
    type: 'number',
    precision: 2,
    rules: [{
      message: '请输入车票金额',
      trigger: 'blur'
    }]
  }, {
    label: '车票数量(张)',
    prop: 'borrowNumber',
    type: 'number',
    precision: 0,
    rules: [{
      required: true,
      message: '请输入借出数量',
      trigger: 'blur'
    }]
  }, {
    label: '库存分区',
    prop: 'stockArea',
    type: 'select',
    dicUrl: '/support/swpmticketarea/dict',
    props: {
      label: "ticketAreaName",
      value: "ticketAreaCode"
    },
    rules: [{
      required: true,
      message: '请选择库存分区',
      trigger: 'blur'
    }]
  }, {
    label: '车票有效期',
    prop: 'activeTime',
    type: 'number',
    precision: 0,
    rules: [{
      required: true,
      message: '请输入车票有效期',
      trigger: 'blur'
    }]
  }, {
    label: '车票最晚启动日期',
    prop: 'latestStartTime',
    type: 'datetime',
    valueFormat: 'yyyy-MM-dd HH:mm:ss',
    rules: [{
      message: '请输入车票最晚启动日期',
      trigger: 'blur'
    }]
  }, {
    label: '起号/止号',
    prop: 'ticketNo',
    type: 'textarea',
    maxRows: 6,
    minRows: 4,
    span: 24
  }, {
    label: '借用人',
    prop: 'borrowPersonName',
    type: 'select',
    component: 'user-select',
    search: true,
    params: {
      userCodeKey: 'borrowPersonCode'
    },
    rules: [{
      required: true,
      message: '请选择借用人',
      trigger: 'blur'
    }]
  }, {
    label: '借用人工号',
    prop: 'borrowPersonCode',
    disabled: true,
    placeholder: ' '
  }, {
    label: '借用时间',
    prop: 'borrowTime',
    type: 'datetime',
    format: 'yyyy-MM-dd HH:mm:ss',
    valueFormat: 'yyyy-MM-dd HH:mm:ss',
    rules: [{
      message: '请输入借用时间',
      trigger: 'blur'
    }]
  }, {
    label: '借用时间',
    prop: 'borrowTimeDTO',
    type: 'date',
    search: true,
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    hide: true,
    display: false,
    showColumn: false
  }, {
    label: '入库单号',
    prop: 'inputStockno',
    addDisplay: false,
    editDisplay: true,
    editDisabled: true
  }, {
    label: '归还人',
    prop: 'returnPersonName',
    type: 'select',
    search: true,
    component: 'user-select',
    params: {
      userCodeKey: 'returnPersonCode'
    },
    rules: [{
      required: true,
      message: '请选择归还人',
      trigger: 'blur'
    }]
  }, {
    label: '归还人工号',
    prop: 'returnPersonCode',
    disabled: true,
    placeholder: ' '
  }, {
    label: '归还时间',
    prop: 'returnTime',
    type: 'datetime',
    format: 'yyyy-MM-dd HH:mm:ss',
    valueFormat: 'yyyy-MM-dd HH:mm:ss',
    rules: [{
      message: '请输入归还时间',
      trigger: 'blur'
    }]
  }, {
    label: '归还时间',
    prop: 'returnTimeDTO',
    type: 'date',
    search: true,
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    hide: true,
    display: false,
    showColumn: false
  }, {
    label: '备注',
    prop: 'remark',
    span: 24,
    type: 'textarea',
    maxRows: 6,
    minRows: 4
  }, {
    label: '附件',
    prop: 'file',
    span: 24,
    type: 'upload',
    component: "zd-upload",
    hide: true
  }, {
    label: '图片',
    prop: 'picture',
    type: 'upload',
    listType: 'picture-img',
    component: 'zd-upload',
    span: 24,
    hide: true
  }, {
    label: '出库人工号',
    prop: 'outputPersonCode',
    hide: true
  }, {
    label: '出库人名称',
    prop: 'outputPersonName',   
    hide: true
  } ]
};

export const tableOptionJieYong = {
  submitBtn: false,
  emptyBtn: false,
  labelWidth: 150,
  group: [{
    label: "车票借用",
    column: [{
      label: '出库单号',
      prop: 'outputStockno',
      disabled: true
    }, {
      label: '出库时间',
      prop: 'outputStockTime',
      type: 'datetime',
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      disabled: true
    }],
  }, {
    label: "出库信息",
    column: [{
      label: '票种',
      prop: 'ticketType',
      type: 'select',
      dicUrl: '/support/swpmticketcardtype/dict',
      cascaderItem: ["ticketName"],
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      disabled: true
    }, {
      label: '车票名称',
      prop: 'ticketName',
      type: 'select',
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
      //  dicFlag: false,
      disabled: true
    }, {
      label: '车票次数',
      prop: 'ticketTimes',
      type: 'number',
      disabled: true
    }, {
      label: '金额',
      prop: 'ticketPrice',
      type: 'number',
      precision: 2,
      disabled: true
    }, {
      label: '车票数量(张)',
      prop: 'borrowNumber',
      type: 'number',
      precision: 0,
      disabled: true
    }, {
      label: '库存分区',
      prop: 'stockArea',
      type: 'select',
      dicUrl: '/support/swpmticketarea/dict',
      props: {
        label: "ticketAreaName",
        value: "ticketAreaCode"
      },
      disabled: true
    }, {
      label: '车票有效期',
      prop: 'activeTime',
      type: 'number',
      precision: 0,
      disabled: true
    }, {
      label: '车票最晚启动日期',
      prop: 'latestStartTime',
      type: 'datetime',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      disabled: true
    }, {
      label: '起号/止号',
      prop: 'ticketNo',
      type: 'textarea',
      maxRows: 6,
      minRows: 4,
      span: 24,
      disabled: true
    }, {
      label: '附件',
      prop: 'file',
      span: 24,
      type: 'upload',
      component: "zd-upload",
      disabled: true
    }, {
      label: '图片',
      prop: 'picture',
      type: 'upload',
      listType: 'picture-img',
      component: 'zd-upload',
      span: 24,
      disabled: true
    }],
  }, {
    label: "借用人信息",
    column: [
    //   {
    //   label: '借用人',
    //   prop: 'borrowPersonName',
    //   type: 'select',
    //   params: {
    //     userCodeKey: 'borrowPersonCode'
    //   },
    //   component: 'user-select',
    //   rules: [{
    //     required: true,
    //     message: '请选择借用人'
    //   }]
    // }, {
    //   label: '借用人工号',
    //   prop: 'borrowPersonCode',
    //   //disabled: true,
    //   //placeholder: ' '
    // }, 
    {
      label: "借用人工号",
      prop: "borrowPersonCode",
      type: "select",
      component: "user-select",
      params: {
        prop: "borrowPersonCode",
        userCodeKey: "borrowPersonName",
        labelKey: "userCode",
        valueKey: "nikename",
        allowCreate: true
      },
      dicQuery: {
        belongToLine: true
      },
    },{
      label: "借用人",
      prop: "borrowPersonName",
      rules: [{
        required: true,
        message: '请输入借用人',
        trigger: 'blur'
      }]
    },
    {
      label: '借用时间',
      prop: 'borrowTime',
      type: 'datetime',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      rules: [{
        message: '请输入借用时间',
        trigger: 'blur'
      }]
    }, {
      label: '单位或部门',
      prop: 'borrowPersonUnit',
    } ],
  }],
};

export const tableOptionGuiHuan = {
  submitBtn: false,
  emptyBtn: false,
  labelWidth: 150,
  group: [{
    label: "车票归还",
    column: [{
      label: '出库单号',
      prop: 'outputStockno',
      disabled: true,
    }, {
      label: '出库时间',
      prop: 'outputStockTime',
      type: 'datetime',
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      disabled: true,
    }, ],
  }, {
    label: "出库信息",
    column: [{
      label: '票种',
      prop: 'ticketType',
      type: 'select',
      dicUrl: '/support/swpmticketcardtype/dict',
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      disabled: true,
    }, {
      label: '车票名称',
      prop: 'ticketName',
      type: 'select',
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dict',
      disabled: true,
    }, {
      label: '车票次数',
      prop: 'ticketTimes',
      disabled: true,
    }, {
      label: '金额',
      prop: 'ticketPrice',
      type: 'number',
      precision: 2,
      disabled: true,
    }, {
      label: '车票数量(张)',
      prop: 'borrowNumber',
      type: 'number',
      precision: 0,
      disabled: true,
    }, {
      label: '库存分区',
      prop: 'stockArea',
      type: 'select',
      dicUrl: '/support/swpmticketarea/dict',
      props: {
        label: "ticketAreaName",
        value: "ticketAreaCode"
      },
      disabled: true,
    }, {
      label: '车票有效期',
      prop: 'activeTime',
      type: 'number',
      precision: 0,
      disabled: true,
    }, {
      label: '车票最晚启动日期',
      prop: 'latestStartTime',
      type: 'datetime',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      rules: [{
        message: '请输入车票最晚启动日期',
        trigger: 'blur'
      }],
      disabled: true,
    }, {
      label: '起号/止号',
      prop: 'ticketNo',
      type: 'textarea',
      maxRows: 6,
      minRows: 4,
      span: 24,
      disabled: true,
    }, {
      label: '附件',
      prop: 'file',
      type: 'upload',
      component: 'zd-upload',
      dataType: 'string',
      limit: 1,
      span: 24,
      disabled: true
    }, {
      label: '图片',
      prop: 'picture',
      type: 'upload',
      listType: 'picture-img',
      component: 'zd-upload',
      span: 24,
      disabled: true
    }, ],
  }, {
    label: "借用人信息",
    column: [{
      label: '借用人',
      prop: 'borrowPersonName',
      type: 'input',
      disabled: true,
    }, {
      label: '借用人工号',
      prop: 'borrowPersonCode',
      disabled: true,
    }, {
      label: '借用时间',
      prop: 'borrowTime',
      type: 'datetime',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      rules: [{
        message: '请输入借用时间',
        trigger: 'blur'
      }],
      disabled: true,
    }, {
      label: '单位或部门',
      prop: 'borrowPersonUnit',
      disabled: true,
    }],
  }, {
    label: "归还信息",
    column: [{
      label: '入库单号',
      prop: 'inputStockno',
      type: 'select',
      dicUrl: '/subwayst/swStInputDetail/page',
      dicQuery: {
        size: -1
      },
      props: {
        label: 'instockno',
        value: 'instockno',
        res: 'data.records'
      },
      filterable: true,
      //row: true,
      rules: [{
        required: true,
        message: '请选择入库单号'
      }],
      formslot: true
    }, {
      label: '归还数量',
      prop: 'returnNumber',
      type: 'number',
      disabled: true
    }, {
      label: '剩余归还数量',
      prop: 'returnNumberRemain',
      type: 'number',
      disabled: true
    }, 
    // {
    //   label: '归还人',
    //   prop: 'returnPersonName',
    //   type: 'select',
    //   component: 'user-select',
    //   params: {
    //     userCodeKey: 'returnPersonCode'
    //   },
    //   rules: [{
    //     required: true,
    //     message: '请选择归还人'
    //   }]
    // }, {
    //   label: '归还人工号',
    //   prop: 'returnPersonCode',
    //   //disabled: true,
    // }, 
    {
      label: "归还人工号",
      prop: "returnPersonCode",
      type: "select",
      component: "user-select",
      params: {
        prop: "returnPersonCode",
        userCodeKey: "returnPersonName",
        labelKey: "userCode",
        valueKey: "nikename",
        allowCreate: true
      },
      dicQuery: {
        belongToLine: true
      },
    },{
      label: "归还人",
      prop: "returnPersonName",
      rules: [{
        required: true,
        message: '请输入归还人',
        trigger: 'blur'
      }]
    }, {
      label: '归还时间',
      prop: 'returnTime',
      type: 'datetime',
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      display: false,
      hide: true
    },
    {
      label: '单位或部门',
      prop: 'returnPersonUnit',
    }, {
      label: '备注',
      prop: 'remark',
      type: 'textarea',
      span: 24
    }]
  }],
};

export const tableOptionGuiHuanView = {
  submitBtn: false,
  emptyBtn: false,
  detail: true,
  labelWidth: 150,
  group: [{
    label: "车票归还",
    column: [{
      label: '出库单号',
      prop: 'outputStockno',
      disabled: true,
    }, {
      label: '出库时间',
      prop: 'outputStockTime',
      type: 'datetime',
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      disabled: true,
    }, ],
  }, {
    label: "出库信息",
    column: [{
      label: '票种',
      prop: 'ticketType',
      type: 'select',
      dicUrl: '/support/swpmticketcardtype/dict',
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      cascaderItem: ["ticketName"],
      rules: [{
        required: true,
        message: '请选择清销毁票种',
        trigger: 'blur'
      }],
      disabled: true,
    }, {
      label: '车票名称',
      prop: 'ticketName',
      type: 'select',
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
      dicFlag: false,
      disabled: true,
    }, {
      label: '车票次数',
      prop: 'ticketTimes',
      rules: [{
        message: '请输入车票次数',
        trigger: 'blur'
      }],
      disabled: true,
    }, {
      label: '金额',
      prop: 'ticketPrice',
      type: 'number',
      precision: 2,
      rules: [{
        message: '请输入车票金额',
        trigger: 'blur'
      }],
      disabled: true,
    }, {
      label: '车票数量(张)',
      prop: 'borrowNumber',
      type: 'number',
      precision: 0,
      rules: [{
        required: true,
        message: '请输入借出数量',
        trigger: 'blur'
      }],
      disabled: true,
    }, {
      label: '库存分区',
      prop: 'stockArea',
      type: 'select',
      dicUrl: '/support/swpmticketarea/dict',
      props: {
        label: "ticketAreaName",
        value: "ticketAreaCode"
      },
      rules: [{
        required: true,
        message: '请选择库存分区',
        trigger: 'blur'
      }],
      disabled: true,
    }, {
      label: '车票有效期',
      prop: 'activeTime',
      type: 'number',
      precision: 0,
      rules: [{
        required: true,
        message: '请输入车票有效期',
        trigger: 'blur'
      }],
      disabled: true,
    }, {
      label: '车票最晚启动日期',
      prop: 'latestStartTime',
      type: 'datetime',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      rules: [{
        message: '请输入车票最晚启动日期',
        trigger: 'blur'
      }],
      disabled: true,
    }, {
      label: '起号/止号',
      prop: 'ticketNo',
      type: 'textarea',
      maxRows: 6,
      minRows: 4,
      span: 24,
      disabled: true,
    }, {
      label: '附件',
      prop: 'file',
      type: 'upload',
      component: 'zd-upload',
      dataType: 'string',
      limit: 1,
      span: 24,
      disabled: true,
    }, {
      label: '图片',
      prop: 'picture',
      type: 'upload',
      listType: 'picture-img',
      component: 'zd-upload',
      span: 24,
      disabled: true,
    }, ],
  }, {
    label: "借用人信息",
    column: [{
      label: '借用人',
      prop: 'borrowPersonName',
      disabled: true,
    }, {
      label: '借用人工号',
      prop: 'borrowPersonCode',
      disabled: true,
    }, {
      label: '借用时间',
      prop: 'borrowTime',
      type: 'datetime',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      rules: [{
        message: '请输入借用时间',
        trigger: 'blur'
      }],
      disabled: true,
    }, {
      label: '单位或部门',
      prop: 'borrowPersonUnit',
      disabled: true,
    }],
  }, {
    label: "归还信息",
    column: [{
      label: '入库单号',
      prop: 'inputStockno',
      disabled: true,
    }, {
      label: '归还数量',
      prop: 'returnNumber',
      type: 'number',
      disabled: true
    }, {
      label: '剩余归还数量',
      prop: 'returnNumberRemain',
      type: 'number',
      disabled: true
    }, {
      label: '归还人',
      prop: 'returnPersonName',
      disabled: true,
    }, {
      label: '归还人工号',
      prop: 'returnPersonCode',
      disabled: true,
    }, {
      label: '单位或部门',
      prop: 'returnPersonUnit',
    }, {
      label: '备注',
      prop: 'remark',
      type: 'textarea',
      span: 24
    }]
  }]
};
